The long term objective of this work is to develop new algorithmic approaches to optimize the delivery of insulin in an automated fashion to people with type 1 diabetes. Specifically, we aim to develop a strategy, inspired by run-to-run control theory established by the chemical process industries, that "learns" from the previous sequence of glucose responses to insulin dosing (over the course of days), and optimally predicts the appropriate strategy for the forthcoming day. The notion of a "cycle" in engineering will be extended to manage the 24 hour routine of repeated meals, activities, and sleep cycles and the corresponding dosing of insulin. The algorithm will be tested in both simulation and clinical trials for robustness to sensor noise, uncertainty in the patient characterization, variability in the timing of the postprandial glucose peak, and variability in the carbohydrate content in the meals. The Specific Aims of this project are to: i) construct predictive patient sensitivity models for calculation of optimal insulin dosing from elevated (or depressed) glucose levels, ii) develop run-to-run algorithm for insulin bolus dosing to provide corrections in subsequent days based on previous history of glucose levels and insulin dosage, and iii) evaluate the robustness of the algorithm through meal challenges of varying carbohydrate content. The aims will blend prototype algorithms that are drawn from systems engineering with validation in a series of clinical tests. The proposed collaboration between systems engineers and renowned diabetes researchers in an established clinical research setting will allow a novel fusion of methods that can be truly characterized as "innovative". The medical collaborators in the proposal are located at the prestigious Sansum Medical Research Institute, which is located less than 10 miles from the campus of the University of California, Santa Barbara. The exchange of personnel will be facilitated, allowing the student and post-doc supported on this project to work at both the institute and the university over the span of the project